1. Field of the Invention
The present invention relates to the method of processing the execution of instructions in an information processing device and more specifically, to the method of changing over threads or the method of changing the priority order of executing threading in an information processing device using a hardware multi-threading method.
2. Description of the Related Art
There is a multi-threading method as one of the methods for using the resources of a calculator as much as possible. The multi-threading method is the method which produces such an effect using one processor that as if a plurality of processors were processing. Thread stands for the processing of one processor among a plurality of logical processors. One of the multi-threading methods is a vertical multi-threading (VMT) method. When any factor for changing over a thread arises, this method changes over the thread and makes a computing unit perform any other irrelevant processing without leaving the computing unit idle.
FIG. 1 is an explanatory drawing of the operation of a conventional VMT method. In this method, the processing of a thread which actually flows through a execution pipeline at a specific time is one, and the processing is the multi-threading processing in which time is vertically divided, but it seems to the OS that two CPUs are working. In order to efficiently execute multi-treading processing, it is important under what condition the thread should be changed over.
Another multi-threading method is a simultaneous multi-threading method (SMT). This method is the multi-threading method in which a plurality of thread instruction strings are inputted alternately or simultaneously to one or more pipelines, and processing is executed by sharing the computing unit, and there can exist a plurality of threads which are processed at a specific time. In the SMT method, when a thread switching condition in which a thread stops operating occurs, it is possible to efficiently use the resources of the calculator by executing the processing of other threads on a preferential basis. In the SMT method, a plurality of address calculators and computing units can be used as occasion arises.
There are the following documents concerning the conventional art using the multi-threading method.    Patent document 1: Kokai (Jpn, unexamined patent publication) No. 11-96005 “Parallel Processing Equipment”    Patent document 2: Kokai (Jpn, unexamined patent publication) No. 2001-521215 “Method and Apparatus for Selecting Thread Switching Events by a Multi-Threading Type Processor”    Patent document 3: Kokai (Jpn, unexamined patent publication) No. 2001-521219 “Change of Thread Priority Order by a Multi-Threading Type Processor”
Disclosed in patent document 1 is the art in which a standing-by thread execution unit is used to realize the speedup of processing by executing the instructions of both the condition fulfilled side and the condition unfulfilled side of the condition branch instructions and selecting either of them after the condition fulfillment or condition unfulfillment is established.
Disclosed in patent documents 2 and 3 is the system which can change the thread priority order in the thread switching logic including a thread switching control register for storing thread switching conditions or can select a thread switching event.
Important as one of thread switching conditions is memory access by a cache miss. A very long time is required for such memory access, and the penalty of a cache miss in a high-speed processor is very huge. A state in which a computing unit, etc. in the processor are not used continues for a long time, and in order to effectively use the waiting time, it is necessary to switch a thread.
However, there also exists a cache miss occurring on the side of operand among cache misses, so it is necessary to correctly distinguish a miss of instruction cache and a miss of operand cache. Moreover, when a cache miss occurs, for example, in accordance with a branch instruction, the instruction string in the memory access is not actually used owing to the miss in branch prediction, etc., and correct processing is executed promptly in the same thread, so that in such a case, it is unnecessary to switch the thread, and when a miss of instruction cache occurs, it is necessary to clarify the condition for changing over the thread.
In patent documents 1 to 3, the method and condition for the switching of the thread which should be implemented by, for example, taking advantage of the opportunity of a miss of instruction cache occurring are not clarified, and the problem in that the condition for changing over the thread must be clarified is not solved.